home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 44
/
Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso
/
Aminet
/
comm
/
misc
/
Sashi89.lha
/
Sashi89
/
sources
/
protocol.h
< prev
next >
Wrap
C/C++ Source or Header
|
2001-05-06
|
1KB
|
65 lines
#ifndef PROTOCOL_H
#define PROTOCOL_H
#include "packet.h"
#define MAX_NAMELENGTH 8
#define MAX_NBNAME 40
#define PROTOCOL_ERROR -1
typedef enum
{
TI_TYPE_EXPR=0x0,
TI_TYPE_LIST =0x4,
TI_TYPE_MATRIX =0x6,
TI_TYPE_DATA =0xA,
TI_TYPE_TEXT =0xB,
TI_TYPE_STRING =0xC,
TI_TYPE_GDB =0xD,
TI_TYPE_FIGURE =0xE,
TI_TYPE_PICTURE =0x10,
TI_TYPE_PRGM =0x12,
TI_TYPE_FUNC =0x13,
TI_TYPE_MAC =0x14,
TI_TYPE_FOLDER =0x1f,
TI_TYPE_ASM =0x21
} ti_type;
typedef struct
{
char name[MAX_NAMELENGTH+1];
int size;
ti_type type;
int state;
} ti_variable;
#define TI_OK 0
#define TI_TIMEOUT -1
#define TI_BADFORMAT -2
#define TI_FILE -3 /* Problem with the file */
#define TI_PROTOCOL -4
#define TI_MEMORY -5
#define TI_NOTEXIST -6
#define TI_PING -7
int ti_ping(int nb);
int ti_listdir(char *foldname, ti_variable *vars);
int ti_folderlist(ti_variable *vars);
int ti_sendfile(char *filename, char *defaultfolder);
int ti_getvar(char *foldername, char *varname, char *filename);
int ti_getfolder(char *foldername, char *filename);
char *ti_code2string(int code);
int ti_isvariable(ti_type type);
#endif